Heroku   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 11
dl 0
loc 19
c 0
b 0
f 0
rs 10

3 Functions

Rating   Name   Duplication   Size   Complexity  
A test 0 3 1
A constructor 0 4 1
A deploy 0 8 1
1
2
import Api from './HerokuApi';
3
4
export default class Heroku {
5
    constructor(name, apiKey, logger) {
6
        this.api = new Api(name, apiKey);
7
        this.logger = logger;
8
    }
9
10
    async deploy(file, version) {
11
        const source = await this.api.createSource();
12
13
        await this.api.upload(source.put, file);
14
        const build = await this.api.createBuild(source.get, version);
15
16
        return build.id;
17
    }
18
19
    test() {
20
        return this.api.test();
21
    }
22
}
23